More Cool Libraries¶
Artificial Intelligence and Machine Learning¶
This category includes libraries for building and interacting with AI models, particularly Large Language Models (LLMs).
- litellm: A lightweight library that provides a unified interface to interact with a variety of Large Language Model (LLM) APIs from different providers.
Data Science and Scientific Computing¶
These libraries are fundamental for data manipulation, analysis, and complex numerical operations, often forming the bedrock of scientific and data-intensive applications.
- networkx<3.5: A library for creating, manipulating, and studying complex networks and graphs, widely used in social network analysis and bioinformatics.
- scipy<1.16: A core library for scientific and technical computing, offering modules for optimization, linear algebra, integration, and signal processing.
Media, Document, and File Processing¶
This group contains libraries specifically designed for handling and manipulating media files, documents, and other file formats.
- beautifulsoup4: A library for pulling data out of HTML and XML files, making it a cornerstone of web scraping.
- fpdf2: A library for programmatically generating PDF documents from Python.
- pillow: The go-to library for image processing in Python, offering extensive capabilities for opening, manipulating, and saving various image formats.
- pydub: A high-level library for simple audio manipulation, such as slicing, concatenating, and applying effects to audio files.
- pypandoc: A wrapper for the Pandoc utility, allowing for the conversion of documents between numerous markup formats (e.g., Markdown to HTML).
- PyYAML: The standard library for parsing and emitting YAML, a human-readable data format often used for configuration files.
- sounddevice: Provides a cross-platform way to play and record audio in real-time by interfacing with a system’s audio drivers.
- soundfile: Enables reading and writing a wide variety of audio file formats into NumPy arrays, ideal for audio data processing.
Web Development and Servers¶
This category includes libraries for building, serving, and enhancing web applications, particularly with asynchronous capabilities.
- httptools: A fast, low-level HTTP protocol parser implemented in C.
- python-multipart: A streaming multipart parser, essential for handling file uploads in web forms.
- sse-starlette: Provides Server-Sent Events (SSE) support for Starlette and FastAPI applications, enabling real-time server-to-client communication.
- tagflow: A library for generating HTML in a block-oriented, programmatic way.
- uvicorn: A lightning-fast ASGI (Asynchronous Server Gateway Interface) server, commonly used to run applications like FastAPI and Starlette.
- websockets: A library for building WebSocket clients and servers, enabling full-duplex communication channels over a single TCP connection.
Database and Data Management¶
These libraries are used for interacting with databases, managing data migrations, and handling data storage.
- alembic: A lightweight database migration tool for use with the SQLAlchemy Database Toolkit.
- asyncpg: A fast, asynchronous client library for the PostgreSQL database.
- diskcache: Provides a fast disk-backed cache, which is useful for storing the results of expensive computations or data processing steps to speed up subsequent runs.
- fakeredis: An in-memory, fake implementation of the Redis client, primarily used for testing applications that rely on Redis.
- minio: A client SDK for Minio and other S3-compatible object storage services.
- psycopg2-binary: A popular PostgreSQL database adapter for Python, providing a C implementation for speed.
- sqlalchemy-utils: A collection of helpful utilities and custom data types that extend SQLAlchemy’s functionality.
Cloud and API Integration¶
These libraries facilitate interaction with various cloud services and third-party APIs.
- boto3: The official AWS (Amazon Web Services) SDK for Python, allowing developers to interact with services like S3, EC2, and more.
- exponent-server-sdk: A server-side SDK for interacting with the Expo push notification service.
- githubkit: A modern, type-annotated Python SDK for the GitHub API.
- plain-client: A Python client for interacting with the Plain customer service platform API.
- polar-sdk: The official Python SDK for the Polar analytics and data platform.
- posthog: The official Python client for the PostHog product analytics platform.
- stripe: The official Python library for the Stripe API, used for processing payments and managing subscriptions.
Asynchronous Programming and Task Queues¶
This group contains libraries for managing concurrent operations, scheduling background jobs, and improving the performance of I/O-bound applications.
- apscheduler: A library for scheduling tasks to be executed at specific times or intervals within a Python process.
- dramatiq: A distributed task queue library for processing background tasks asynchronously with a focus on simplicity and reliability.
- uvloop: A fast, drop-in replacement for the built-in
asyncio
event loop, implemented in Cython. - watchdog-gevent: A version of the
watchdog
file monitoring library that is compatible with thegevent
networking library.
Development, Testing, and Code Quality¶
These libraries are used to improve the development process itself, from code quality and dependency management to building more interactive and user-friendly applications.
- freezegun: A library that allows you to mock the
datetime
module, enabling tests for time-dependent code. - GitPython: A library for interacting with Git repositories programmatically, allowing for automation of version control tasks.
- grep_ast: A tool for searching Python code at the Abstract Syntax Tree (AST) level, allowing for more precise and structural code analysis than text-based search.
- lupa: A library that integrates the Lua or LuaJIT runtime with CPython, allowing for interoperability between the two languages.
- makefun: A library for creating Python functions dynamically at runtime with custom signatures.
- mypy: A static type checker for Python, which helps catch type errors before runtime.
- pexpect: A library for automating interactive command-line applications by spawning and controlling child processes.
- pytest-asyncio: A pytest plugin for testing
asyncio
code. - pytest-cov: A pytest plugin that measures code coverage during test runs.
- pytest-mock: A pytest plugin that simplifies the use of mock objects in tests.
- pytest-recording: A pytest plugin that records and replays network interactions to make tests faster and more reliable.
- pytest-subtests: A pytest plugin that enables the use of subtests for more granular test cases.
- pytest-sugar: A pytest plugin that enhances the visual output of test runs.
- pytest-xdist: A pytest plugin that distributes tests across multiple CPUs to speed up execution.
- respx: A utility for mocking out
httpx
responses, essential for testing code that makes HTTP requests. - ruff: An extremely fast Python linter and code formatter designed to improve code quality and consistency.
- watchfiles: A simple and fast file-watching library used to trigger actions (like server reloads) on code changes.
Command-Line Interface (CLI) and Configuration¶
This category is focused on libraries that help build and manage command-line applications and their configurations.
- configargparse: Extends Python’s
argparse
module to allow for configuration through command-line arguments, environment variables, and configuration files. - pathspec: A library for pattern matching of file paths, commonly used to implement
.gitignore
-style file filtering. - prompt_toolkit: A powerful library for building interactive and advanced command-line interfaces with features like autocompletion and syntax highlighting.
- rich: A library for creating visually rich and beautifully formatted terminal output, including colors, tables, progress bars, and more.
- shtab: Automates the generation of shell tab completion scripts for command-line tools built with
argparse
. - taskipy: A task runner that allows you to define and manage development tasks in your
pyproject.toml
file. - typer: A library for building modern and user-friendly Command-Line Interfaces (CLIs) with minimal code.
Data Formatting, Validation, and Interchange¶
These libraries are essential for handling, validating, and converting data between different structured formats.
- diff-match-patch: Provides algorithms for finding differences between texts, useful for version control and data synchronization.
- email-validator: A robust library for validating email addresses based on syntax rules and deliverability checks (like DNS records).
- json5: A parser and serializer for the JSON5 format, a more human-friendly extension of JSON that allows for comments and other conveniences.
- jsonschema: Used to validate JSON data against a predefined schema, ensuring data integrity and structure.
- pydantic-extra-types: A collection of additional, useful data types for use with the Pydantic validation library.
- pydantic-settings: A Pydantic extension for managing application settings from environment variables and
.env
files. - python-stdnum: A library for parsing, formatting, and validating various standard numbers and codes, such as IBAN, VAT, and ISBN.
Authentication, Security, and Type Stubs¶
These libraries are focused on security, authentication, and providing type information for better development tools.
- authlib: A comprehensive library for building OAuth 2.0 clients and servers, OpenID Connect, and other authentication standards.
- boto3-stubs: Type stubs for
boto3
, providing type hints for static analysis and autocompletion in IDEs. - httpx-oauth: Provides OAuth 2.0 and OpenID Connect client support for the
httpx
library. - itsdangerous: A library for securely signing data to ensure its integrity, commonly used for session cookies and tokens.
- mypy-boto3-s3: Type stubs specifically for the AWS S3 service in
boto3
. - pyjwt: An implementation of the JSON Web Token (JWT) standard for creating and verifying secure tokens.
- safe-redirect-url: A utility for generating safe URLs for redirects to help prevent open redirect vulnerabilities.
- types-python-slugify: Type stubs for the
python-slugify
library. - types-redis: Type stubs for the popular
redis-py
library. - types-requests: Type stubs for the
requests
HTTP library.
Observability and Logging¶
These libraries are essential for monitoring application health, tracking errors, and generating structured logs.
- logfire: A modern observability and logging tool for Python applications.
- opentelemetry-instrumentation-fastapi: An OpenTelemetry package that automatically instruments FastAPI applications for tracing and metrics.
- opentelemetry-instrumentation-httpx: An OpenTelemetry package that instruments the
httpx
library to trace outgoing HTTP requests. - opentelemetry-instrumentation-redis: An OpenTelemetry package that instruments the
redis-py
library to trace database calls. - opentelemetry-instrumentation-sqlalchemy: An OpenTelemetry package that instruments SQLAlchemy for tracing database queries.
- sentry-sdk: The official Python SDK for Sentry, a platform for real-time error tracking and performance monitoring.
- structlog: A library for advanced, structured logging, making logs more machine-readable and easier to process.
System, Network, and General Utilities¶
This group includes libraries that deal with lower-level system, network, I/O, and other general utility tasks.
- babel: A library for internationalizing and localizing Python applications.
- backoff: Provides function decorators to automatically retry operations that fail, which is useful for handling unreliable network services.
- ipinfo-db: A library for working with the IPinfo.io offline IP address database.
- jinja2: A modern, fast, and secure templating engine, often used for generating HTML, configuration files, or other text-based formats.
- netaddr: A powerful library for representing and manipulating network addresses, including IP addresses, subnets, and MAC addresses.
- pycountry: Provides access to ISO standards databases for countries, subdivisions, languages, currencies, and scripts.
- pyperclip: A simple, cross-platform module for programmatically copying text to and pasting from the system clipboard.
- python-slugify: A library that converts text into URL-friendly “slugs” by removing or replacing special characters.
- psutil: A cross-platform library for accessing system details and process information, useful for monitoring resources in data-intensive applications.
Page last modified: 2025-08-27 09:45:50